package main.java.tmi.movement.service.impl;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import main.java.tmi.common.service.impl.AbstractDao;
import main.java.tmi.movement.service.MovementVO;

import org.springframework.stereotype.Repository;

/**
 * Asign Data Access Object
 *
 * @author min
 * @since 2010. 09. 10.
 */
@Repository
public class MovementDAO extends AbstractDao {
	
	public Map<String,String> getMovementView(Map<String,String> param){
    	
    	Map<String,String> returnMap ;
        returnMap = (Map<String,String>) selectByPk("MovementDAO.getMovementView", param);
        return returnMap;
    }
    
	

	//조회
	public List<MovementVO> getMovementDetailList(Map<String,String> param) throws SQLException {
		return (List<MovementVO>) list("MovementDAO.getMovementDetailList", param);
	}
	
	
	public void  addMovement(Map<String, String> param) throws SQLException {
		insert("MovementDAO.addMovement", param);
	}
	
	
	public int  modifyMovement(Map<String, String> param) throws SQLException {
		return update("MovementDAO.modifyMovement", param);
	}
	

	//수정
	public int  movementDetailUpdate(Map<String, String> param) throws SQLException {
		return update("MovementDAO.movementDetailUpdate", param);
	}
	
	
	public int  deleteDoDep(Map<String, String> param) throws SQLException {
		return update("MovementDAO.deleteDoDep", param);
	}
	
	public int  deleteDoHead(Map<String, String> param) throws SQLException {
		return update("MovementDAO.deleteDoHead", param);
	}
	
	//확정
    public int  confirmMovement(Map<String, String> param) throws SQLException {
        return update("MovementDAO.confirmMovement", param);
    }
}
